<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('资源目录信息列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
<!--
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>创建人名称：</label>
                            <input type="text" name="createName"/>
                        </li>
                        <li>
                            <label>创建日期：</label>
                            <input type="text" class="time-input" placeholder="请选择创建日期" name="createDate"/>
                        </li>
                        <li>
                            <label>更新人名称：</label>
                            <input type="text" name="updateName"/>
                        </li>
                        <li>
                            <label>更新日期：</label>
                            <input type="text" class="time-input" placeholder="请选择更新日期" name="updateDate"/>
                        </li>
                        <li>
                            <label>父资源：</label>
                            <input type="text" name="parentId"/>
                        </li>
                        <li>
                            <label>资源名称：</label>
                            <input type="text" name="resourcesName"/>
                        </li>
                        <li>
                            <label>资源描述：</label>
                            <input type="text" name="resourcesRemark"/>
                        </li>
                        <li>
                            <label>资源路径：</label>
                            <input type="text" name="resourcesDirPath"/>
                        </li>
                        <li>
                            <label>组织机构id：</label>
                            <input type="text" name="departId"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
-->

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:resources:add">
                <i class="fa fa-plus"></i> 新增
            </a>
            <a class="btn btn-info" id="expandAllBtn">
                <i class="fa fa-exchange"></i> 展开/折叠
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-tree-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var addFlag = [[${@permission.hasPermi('system:resources:add')}]];
    var editFlag = [[${@permission.hasPermi('system:resources:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:resources:remove')}]];
    var prefix = ctx + "resources";

    $(function() {
        var options = {
            code: "id",
            parentCode: "parentId",
            expandColumn: "1",
            // expandAll: false,
            uniqueId: "id",
            url: prefix + "/list",
            createUrl: prefix + "/add/{id}",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove/{id}",
            modalName: "资源目录信息",
            columns: [{
                field: 'selectItem',
                radio: false
            },
/*
                {
                    field: 'createName',
                    title: '创建人名称',
                    align: 'left'
                },
                {
                    field: 'createDate',
                    title: '创建日期',
                    align: 'left'
                },
                {
                    field: 'updateName',
                    title: '更新人名称',
                    align: 'left'
                },
                {
                    field: 'updateDate',
                    title: '更新日期',
                    align: 'left'
                },
                {
                    field: 'parentId',
                    title: '父资源',
                    align: 'left'
                },
                {
                    field: 'departId',
                    title: '组织机构id',
                    align: 'left'
                },
*/
                {
                    field: 'resourcesName',
                    title: '目录名称',
                    align: 'left',
                    width: 'auto',
                    height:"auto"
                },
                   /* {
                    field: 'resourcesRemark',
                    title: '目录描述',
                    align: 'left',
                    width: 'auto',
                    height:"auto"
                },*/
              /*  {
                    field: 'resourcesDirPath',
                    title: '目录物理路径',
                    align: 'left',
                    width: 'auto',
                    height:"auto"
                },*/
                {
                    title: '操作',
                    align: 'left',
                    width: 'auto',
                    height:"auto",
                    formatter: function(value, row, index) {
                        var actions = [];
                      /*  actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-info  btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.id + '\')"><i class="fa fa-plus"></i>新增</a> ');*/
                        actions.push('<a  href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };

        $.treeTable.init(options);
        $("#expandAllBtn").click();
    });
</script>
<style>
    .table {
        width: 127% !important;
        max-width: 134%!important;
        margin-bottom: 20px!important;
    }
</style>
<!--<style>
       table {
           table-layout: fixed;
       }
       th{
           width: 80px!important;
       }
       table td {
           position: relative;
           height: 20px;
           text-align: center;
           font-weight: normal;

           width: 100%;
           word-break: keep-all;
           white-space: nowrap;
           overflow: hidden;
           text-overflow: ellipsis;
       }

       table td:hover {
           overflow: visible;
           white-space: normal;
           word-wrap: break-word;
       }
</style>-->
</body>
</html>
